#include"AlgKruskalPlugin.h" 
#include<stdio.h>

/*!
\file AlgKruskalPlugin.cpp
\brief Contains implementation of AlgKruskalPlugin.
\ingroup Plugins
*/

Algorithm *AlgKruskalPlugin::createAlgorithm( Graph *g ){
	return new AlgKruskal(g);
}

bool AlgKruskalPlugin::canAcceptGraph( Graph *g ){
	bool ok = true;
	for( int i = 0; i < g->numEdges() && ok; i++ ){
		g->edge(i).label().toInt(&ok);
	}
	return ok && !g->isDirected();
}

#include<QtGui>
Q_EXPORT_PLUGIN2(algkruskalplugin, AlgKruskalPlugin) 
